package com.zzx.boot.entity.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

/**
 * @author tan
 * @version 1.0
 * @date 2023/7/10 20:37
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PasswordDto {

    @NotNull(message = "旧密码不能为空")
    @Length(min = 6,max=17,message = "密码长度不能小于六并且不能大于16")
    private String oldPassword;
    @NotNull(message = "新密码不能为空")
    @Length(min = 6,max=17,message = "密码长度不能小于六并且不能大于16")
    private String newPassword;

    @NotNull(message = "确认新密码不能为空")
    @Length(min = 6,max=17,message = "密码长度不能小于六并且不能大于16")
    private String newPassword2;


}
